package leetcode_1801_1900;

import java.util.Arrays;

public class LeeCode_1828 {
    public static void main(String[] args) {
        System.out.println(Arrays.toString(countPoints(new int[][]{{1, 3}, {2, 2}, {3, 3}}, new int[][]{{2, 3, 1}})));
    }
    private static int[] countPoints(int[][] points, int[][] queries) {
        int n = queries.length;
        int[] ans = new int[n];
        for (int i = 0; i < n; i++) {
            int x = queries[i][0], y = queries[i][1], r = queries[i][2], count = 0;
            for (int[] point : points) {
                int cx = x - point[0];
                int cy = y - point[1];
                if (cx * cx + cy * cy <= r * r){
                    count++;
                }
            }
            ans[i] = count;
        }
        return ans;
    }
}
